package com.javasm.crm.mapper.goodsmapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.javasm.crm.domin.entity.productEntity.GoodsSupplier;
import com.javasm.crm.domin.entity.productEntity.GoodsSupplierVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface GoodsSupplierVoMapper extends BaseMapper<GoodsSupplierVo> {
    @Select("select gi.*,gs.supplier_id from goods_supplier gs inner join goods_info gi on gs.supplier_id=gi.good_providerid"+" ${ew.customSqlSegment}")
    List<GoodsSupplierVo> queryall(Page<GoodsSupplierVo> pagination, @Param(Constants.WRAPPER) QueryWrapper<GoodsSupplierVo> exampleQueryWrapper);

}